import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

// 引入路由守卫
import './router/permission.js'

// 运行数据库：

// 引入element ui
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'

// 添加小图标
import './iconfont/iconfont.css'
import './iconfont/font/iconfont.css'

// 引入echarts
import * as echarts from 'echarts'

// 引入vue-i18n
import Vuei18n from 'vue-i18n'
// 将echarts挂载到vue的根节点上
Vue.prototype.$echarts = echarts

Vue.use(ElementUI)
Vue.use(Vuei18n)
// 创建 i18n实例
const i18n = new Vuei18n({
  locale: store.getters.locale,
  messages: {
    cn: require('./lang/zh'),
    en: require('./lang/en')
  }
})

Vue.config.productionTip = false

new Vue({
  router,
  store,
  i18n,
  render: h => h(App)
}).$mount('#app')
